package com.drone.drone_server.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.drone.drone_server.entity.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


// 无人机飞行记录DAO
public interface DroneFlightRecordDao extends BaseMapper<DroneFlightRecord> {
    @Select("SELECT * FROM drone_flight_record WHERE flight_status = #{status} " +
            "AND start_time BETWEEN #{start} AND #{end}")
    List<DroneFlightRecord> selectByStatusAndTime(@Param("status") String status,
                                                  @Param("start") String startTime,
                                                  @Param("end") String endTime);
}
